package cn.zkdcloud.framework.render;

import cn.zkdcloud.framework.servlet.HttpContext;

import java.io.IOException;

/**
 * @author zk
 * @version  2017/7/18.
 */
public class RedirectRender extends AbstractRender {

    private String url;

    public RedirectRender(String url){
        this.url = url;
    }
    @Override
    public void doRender(HttpContext context) {
        try {
            context.getResponse().sendRedirect(url);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
